<?php
session_start();
if (! isset($_SESSION[ 'login' ])) {
	header("Location:login.php");
	exit;
}

include_once('libs/db.php');
include_once('config.php');
include_once('libs/access_control.php');

$val_dec = 0;
$val_str = "";
if ($_GET['dec']=='true') {
	$val_dec = $_GET['valor'];
} else {
	$val_str = $_GET['valor'];
}

$query = "REPLACE libro_valores VALUES ({$_GET['id_libro']}, {$_GET['id_tipos_libro_valor']}, {$val_dec}, '{$val_str}', 0, SYSDATE());";
echo $query;
if (!@mysql_query($query)) {
	// Error
}

?>